package tool;

import org.junit.Test;

import java.net.MalformedURLException;
import java.net.URL;

public class TS {
    @Test
    public void t1(){
        try {
            URL url = new URL("https://www.baidu.com/");
            System.out.println(url.getFile());
            System.out.println(url.getProtocol());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }
}
